Windshield fog detector

ABSTRACT

The system of the present invention is configured to detect moisture on a surface and includes a sensor that may be divided into a plurality of subwindows. At least one of the subwindows has a sensitivity that is independently variable. The system may further include an optical system operative to direct light rays from at least a portion of the surface onto the sensor, and a processing system in communication with the sensor and operative to independently adjust the sensitivity of the at least one subwindow and to analyze data from the sensor to detect moisture. The processing system may control the windshield wipers based upon a number of subwindows in which moisture is detected.

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is a divisional of U.S. patent application Ser.No. 09/970,728 filed on Oct. 4, 2001. The entire disclosure of which isincorporated herein by reference.

BACKGROUND OF THE INVENTION

[0002] The present invention relates to a system for automaticallydetecting the presence of moisture on a surface, such as the surface ofa windshield of a vehicle for an automobile, in order to automaticallyactuate the vehicle's windshield wipers and/or defroster or defoggingsystem.

[0003] In conventional windshield wiper systems, the windshield wipersare actuated based on the elapsed time between wipes rather than themoisture level on the exterior of the windshield. During conditions ofrelatively consistent rainfall, for example, the time interval can beadjusted to correspond to the amount of time in which the rainaccumulates to the point of the desired visibility level. Unfortunately,the rate of rainfall may vary dramatically over a given period of time.Additionally, traffic conditions may also cause varying amounts of rainto fall on the windshields, such as when a truck passes by. As a result,during such conditions, the driver must frequently adjust the wiper timeinterval, which can be cumbersome.

[0004] Various systems are known which automatically control theinterval between wipes of the windshield wipers based upon moisture onthe vehicle windshield. In some known systems, various coatings areapplied to the vehicle windshield. Electrical measurement of thosecoatings is used to provide an indication of the moisture content on thewindshield. Unfortunately, such methods require relatively expensiveprocesses, which makes such systems commercially non-viable. Othersystems for automatically sensing the moisture content on a vehiclewindshield are also known. For example, optical systems are known whichmeasure the difference of reflected light of a dry windshield versus awet windshield. Unfortunately, such optical systems are susceptible tointerference from external light sources and thus provide inadequateperformance. Other known systems must be adhered to the windshield,which complicates the windshield replacement. As a result of suchcomplications, moisture sensors are rarely found on vehicles.

[0005] Another system for automatically detecting the moisture contenton a windshield is disclosed in Japanese Laid Open Patent ApplicationNo. Hei (1995)-286130, which describes the use of a charge coupleddevice (CCD) image sensor to image a portion of the vehicle windshieldin order to detect raindrops. The system described therein computes thesum of the differences between each pixel and the average of all pixels.Unfortunately, headlamps of oncoming vehicles will create a bright spotin the image, which would be difficult to completely blur and likely beinterpreted as rain. Moreover, in order for such a system to workeffectively, distant objects within the imaged scene must be completelyblurred. Otherwise, there will be dark and light regions in the imagedscene corresponding to the distant objects. Although there is no opticalsystem disclosed in the Japanese laid open patent application foraccomplishing this objective, it would be very difficult to develop anoptical system to completely blur an oncoming headlamp. Failure to bluroncoming headlamps could cause false triggering of the system disclosedin the above-identified Japanese laid open patent application.

[0006] Another problem with automatic rain detection systems is theinability of the system to detect the operation of the windshieldwipers. In certain cold climate conditions, the windshield wipers areknown to freeze to the windshield. In such a situation, since themoisture is not being removed by the wipers, an automatic rain sensingdevice would continuously command the wipers to actuate, even though thewipers are frozen to the windshield, potentially damaging the windshieldwiper system.

[0007] Another problem with known systems is the inability to detect fogon the interior and exterior of the windshields. As mentioned above,automatic moisture detection systems, such as disclosed in theabove-identified Japanese laid open patent application, are based uponthe ability to detect raindrops on the windshield. When a uniform fog ormist covers the vehicle windshield, systems, such as the systemdisclosed in the Japanese laid open patent application, are unable tosense such moisture on the exterior of the windshield. As a result,during such a condition, the windshield wipers will have to be manuallyactuated, thereby partially defeating the purpose of an automatic rainsensor and windshield wiper control system making the feature a lot lessdesirable.

[0008] In other situations, fog develops on the inside of the windshieldindependent of the moisture content on the exterior of the windshield.In such a condition, automatic rain sensing systems, such as disclosedin the Japanese laid open patent application, are unable to detect themoisture content on the exterior of the vehicle windshield until afterthe fog on the interior of the windshield is cleared. In such acondition, a defroster or defogger system would have to be manuallyactuated to remove the interior fog on the windshield. The automaticrain sensor would not be operable during such a condition until the fogon the interior of the windshield is sufficiently cleared.

[0009] In commonly assigned U.S. Pat. Nos. 5,923,027, 6,097,024, and6,262,410, a moisture sensing system is disclosed that overcomes theproblems noted above. Nevertheless, it would be desirable to furtherimprove the ability of the disclosed system to distinguish from lightsources within the imaged scene that may cause false triggering of thewindshield wipers.

SUMMARY OF THE INVENTION

[0010] According to one embodiment of the present invention, a moisturesensing system is provided that comprises: a sensor that is divided intoa plurality of subwindows each having a sensitivity that is variableindependent of the other subwindows; an optical system operative todirect light rays from at least a portion of the surface onto thesensor; and a processing system in communication with the sensor andoperative to adjust the sensitivity of the subwindows and to analyzedata from the sensor to detect moisture on the surface.

[0011] According to another embodiment of the invention, a system isprovided for detecting moisture on a surface that comprises: a sensorthat is divided into a plurality of subwindows, at least one of thesubwindows having a sensitivity that is independently variable; anoptical system operative to direct light rays from at least a portion ofthe surface onto the sensor; and a processing system in communicationwith the sensor and operative independently to adjust the sensitivity ofthe at least one subwindow and to analyze data from the sensor to detectmoisture on the surface.

[0012] According to another embodiment of the present invention, awindshield wiper control system for a vehicle is provided thatcomprises: a sensor that is divided into a plurality of subwindows; anoptical system operative to direct light rays from at least a portion ofthe surface of the windshield onto the sensor; and a processing systemin communication with the sensor and operative to analyze data from thesensor to determine whether moisture is detected in each subwindow andto control the windshield wipers based upon a number of subwindows inwhich moisture is detected.

[0013] According to another embodiment of the present invention, awindshield wiper control system for a vehicle is provided thatcomprises: a sensor; an optical system operative to direct light raysfrom at least a portion of the surface of the windshield onto thesensor; and a processing system in communication with the sensor andoperative to analyze data from the sensor to detect moisture on thewindshield and to automatically activate the windshield wipers whenmoisture is detected. The processing system is responsive to at leastone remote device to enable or disable automatic control of thewindshield wipers.

[0014] According to another embodiment of the present invention, asystem for detecting moisture on a surface is provided that comprises:an image sensor array including a plurality of light sensors; an opticalsystem operative to image at least a portion of the surface onto theimage sensor array; a supplemental illuminator for selectivelyilluminating the portion of the surface imaged onto the image sensorarray; memory for storing a first image obtained by the image sensorarray when the supplemental illuminator is illuminating the portion ofthe surface, and for storing a second image obtained by the image sensorarray when the supplemental illuminator is not illuminating the portionof the surface; and a processing system in communication with thememory, the supplemental illuminator, and the image sensor array. Theprocessing system is operative to compare the first and second imagesstored in the memory and to analyze results of the comparison to detectmoisture on the surface.

[0015] According to another embodiment of the present invention, a fogdetector system is provided for detecting fog on an inside surface of avehicle window. The fog detector system comprises: an emitter forselectively projecting radiation onto a region of the inside surface ofthe vehicle window; a sensor disposed with its optical axissubstantially in parallel with that of the emitter, the sensor beingsensitive to the radiation projected by the emitter for sensing levelsof incident radiation both when the emitter projects radiation and whenthe emitter does not project radiation; and a control circuit coupled tothe emitter for selectively activating the emitter, and coupled to thesensor for receiving signals from the sensor representing the level ofincident radiation. The control circuit determines the differencebetween levels of incident radiation when the emitter is activated andwhen the emitter is deactivated, and compares the difference to athreshold to determine whether fog is present. When fog is present, thecontrol circuit generates a signal indicating the presence of fog on thevehicle window.

[0016] These and other features, advantages, and objects of the presentinvention will be further understood and appreciated by those skilled inthe art by reference to the following specification, claims, andappended drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In the drawings:

[0018]FIG. 1 is a side elevational view showing a rearview mirrorassembly incorporating a moisture sensing system constructed inaccordance with the present invention;

[0019]FIG. 2 is an enlarged view showing the moisture sensing systemconstructed in accordance with the present invention;

[0020]FIG. 3 is a side elevational view showing the moisture sensingsystem in proximity to a vehicle windshield;

[0021]FIGS. 4A and 4B are computer simulated spot diagrams, whichillustrate the performance of the optical system in accordance with thepresent invention during moisture and non-moisture conditions,respectively;

[0022]FIG. 5 is an enlarged view showing a moisture sensing systemconstructed in accordance with a second embodiment of the presentinvention;

[0023]FIG. 6 is a side elevational view of a portion of the moisturesensing system of the second embodiment shown relative to a vehiclewindshield;

[0024]FIG. 7 is a block diagram of the moisture sensing systemconstructed in accordance with the present invention;

[0025]FIG. 8 is a block diagram illustrating an image sensor arraydivided into various subwindows; and

[0026]FIG. 9 is a partial perspective view and electrical circuitdiagram in block form illustrating a fog detecting system constructed inaccordance with another embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0027] A moisture sensing system in accordance with the presentinvention is able to detect moisture on a surface such as the windshieldof a vehicle. Such a system is useful for automatically controlling thevehicle's windshield wipers, defroster, and/or defogging systems. Thesystem for sensing moisture on a vehicle windshield eliminates many ofthe performance deficiencies of known moisture sensing systems andprovides a moisture sensing system at a commercially viable cost. Asused herein, the term “moisture” is used to designate various types ofmoisture and precipitation which can be found on the windshield of avehicle during various climatic conditions, such as rainfall, snowfall,ice, and fog, as well as other substances that are commonly deposited ona vehicle windshield such as bugs, dust, and the like. The system isable to provide superior performance to other known systems duringrather common climatic conditions, such as ice, fog, and varying levelsof rain, snowfall, and the like.

[0028] Referring to FIG. 1, the moisture sensing system of a firstembodiment of the present invention is generally identified with thereference numeral 20. The moisture sensing system is preferably mountedstationary in the mounting bracket 22 of an automobile rearview mirror24 or alternatively mounted in the rear portion of the rearview mirrorhousing 24. Further still, the moisture sensing system may be mountedelsewhere in the vehicle. For example, the moisture sensing system couldbe mounted in a headliner, an overhead console, A-pillar, instrumentpanel dash, a windshield-mounted console, or in any other vehicleaccessory. The moisture sensing system 20 includes an imaging system 30including a sensor array 32 mounted, for example, 55-105 mm behind thevehicle windshield 26 with the optical axis substantially parallel toground or slightly angled to the ground. The angle of the windshield 26in a modern passenger car varies considerably from model to model. Anexample of the angle of a car windshield is about 27°. The windshieldangle of trucks may be much different. Such a configuration may causethe raindrops and other moisture to be at a different distance from theimage sensor array 32 depending on where the moisture is with respect tothe field of view of the image sensor array 32. To help compensate forthis problem, the image sensor array 32 may be angled toward thewindshield 26 such that the top of the image sensor 32 is moved closerto the windshield 26. For example, with a windshield angle of about 27°,image sensor 32 may be angled approximately 12-17° toward the windshield26.

[0029] There are four components to the inventive moisture sensingsystem 20 of the first embodiment: an imaging optical system; one ormore light emitting diodes; an image sensor array; and a processingsystem. The imaging optical system is shown in FIGS. 2, 3, 5, and 6,while the image sensor array is illustrated in FIGS. 2, 5, 7, and 8.

[0030] The imaging optical system is used to image a predeterminedportion of the windshield 26 onto the sensor array 32 such that objectsat the approximate distance of the windshield 26 are more sharply infocus at the image plane while objects at a longer distance are more outof focus and blurred. The area of the windshield 26 that is imagedshould be large enough that the probability of receiving raindropsduring relatively light rain conditions is significant. Moreover, theimaged area of the windshield should also be in the area of thewindshield that is wiped by the windshield wipers.

[0031]FIGS. 4A and 4B illustrate a computer simulation of theperformance of the imaging system illustrated in FIG. 2. In particular,FIG. 4A is a spot diagram of the imaging of approximately parallel lightrays from a relatively distant object on the optical axis onto an imageplane. FIG. 4B is a spot diagram of the imaging of a point on theoptical axis at the distance of the outer surface of the windshield.Upon comparison of the spot diagrams of FIGS. 4A and 4B, it is evidentthat the optical system is able to blur light coming from distantobjects while focusing light from objects at the windshield distance.

[0032] The imaging optical system preferably includes a single asphericlens 33 (see FIGS. 2, 5, and 6). The lens may be carried by a mechanicallens mount 34, which forms a stop 36 about a 5 mm diameter directly infront of the lenses. According to a preferred embodiment, lens 33 has adiameter of 9 mm, an edge thickness of 0.04009 mm, and a thickness alongthe central optical axis of 3.295987 mm. The lens is preferably made ofacrylic, which has a refractive index nD of 1.49167 and an Abbe numbervD of 55.31019. The object side surface has an effective radius ofcurvature of 7.377602 mm, a conic of −0.8590915 mm, and a second orderterm of 0.0390. The image side of lens 33 has an effective radius ofcurvature of −5.039234 mm, a conic of −1.500052 mm, and a second orderterm of 0.0556585. It will be appreciated, however, that one or morelenses having different constructions may likewise be used and that theinvention is not limited to the specific lens described above.

[0033] The image sensor array 32 is located behind the lens 33 and isslightly angled by about 12-17°. It will be appreciated, however, thatthe angle at which image sensor array 32 is disposed is dependent uponthe angle of the windshield, and thus the angle of the image sensorarray 32 may vary. Preferably, image sensor array 32 is angled relativeto windshield 26 such that the Scheimpflug condition is satisfied. TheScheimpflug condition is discussed in “Modern Optical Engineering,” byWarren J. Smith (page 52). Basically, the Scheimpflug condition suggeststhat when the image plane is not parallel to the object plane, theoptimal focus is obtained when the object and image planes intersecteach other at the plane of the lens. Thus, by extending the plane of thelens upward to determine where it intersects the windshield plane, theangle of the image sensor array 32 may be determined by extending itsplane from the point of intersection.

[0034] More elaborate optical systems, for example, with additionalelements, aspherical elements, or defractive objects, could all be usedespecially if a shorter distance from the windshield is a desiredfeature. However, since the collected images are not for photographicpurposes, such optical quality is not necessary in an application formoisture detection.

[0035] The image sensor array 32 is preferably a CMOS active pixel imagesensor. CMOS active pixel image sensors provide low cost, highsensitivity imaging on a chip manufactured in a CMOS process. Such CMOSactive pixel image sensors have several advantages over other sensorsincluding low power consumption, popular CMOS production techniques, lowcost, ability to integrate additional circuitry on the same chip,variable read out windows, and a variable light integration time. SuchCMOS active pixel image sensors are commercially available from PhotobitInc., Pasadena, Calif., including, for example, Photobit part No.PB-0111. Suitable systems are described in detail in commonly assignedU.S. Pat. No. 5,990,469, entitled “CONTROL CIRCUIT FOR IMAGE ARRAYSENSORS,” by Jon H. Bechtel et al., and commonly assigned U.S. Pat. No.6,008,486, entitled “WIDE DYNAMIC RANGE OPTICAL SENSOR,” by Joseph S.Stam et al., the entire disclosures of which are incorporated herein byreference. The ability to obtain images from separate subwindows of theCMOS image sensor make it particularly suitable for the presentinvention in which the image sensor array 32 is divided into“subwindows.”

[0036] While CMOS active pixel image sensors have substantialadvantages, other image sensors are also suitable and are considered tobe within the scope of the present invention. The size and number ofpixels is determined to image an area of the windshield sufficientlylarge and in enough detail to adequately detect light rain whileremaining cost effective. A 64×80 active pixel array may be utilized oralternatively, a one-dimensional sensor array may be utilized. Accordingto a more preferred example, a Photobit PB-0111 Common IntermediateFormat (CIF) Imager is used that has a 352×288 active pixel array withpixel spacing of 7.8 μm.

[0037]FIG. 5 shows an enlarged view of a moisture sensing system 100constructed in accordance with a second embodiment of the presentinvention. Moisture sensor system 100 generally includes all theelements of system 20 of the first embodiment, but additionally includesa supplemental illuminator 102, which may be an LED or other lightsource, an optional supplemental illuminator lens 104, and a window 106disposed in front of lenses 33, 68, and 104. Window 106 may include aphotocatalytic/hydrophilic coating 108 on an exterior surface thereof tomaintain a clear and clean surface, even in the presence of moisturedroplets or other contaminants that may form on the outer surface ofwindow 106. Such contaminants may include cleaners, grease, or the like.Examples of suitable photocatalytic/hydrophilic coatings are disclosedin commonly assigned U.S. Pat. No. 6,193,378, the entire of disclosureof which is incorporated herein by reference.

[0038] As shown in FIG. 6, supplemental illuminator 102 and supplementalilluminator lens 104 are configured so as to project light over the sameportion of windshield 26 that is imaged by lens 33 and image sensorarray 32. Supplemental illuminator 102 differs in this respect fromilluminator 66, which projects a small spot on the windshield for fogdetection. Supplemental illuminator 102 may be periodically activatedsuch that images are obtained with and without supplementalillumination. Such images may then be compared and analyzed to detectmoisture on the surface of the windshield. In relatively darkconditions, some image sensors may not be capable of collecting enoughlight in a reasonable time to adequately image moisture such asraindrops. In such a situation, supplemental illuminator 102 may brieflyilluminate the area of interest from behind while the images are beingtaken. If the windshield of the vehicle is not highly absorbent toinfrared radiation, supplemental illuminator 102 may be a near infraredilluminator as long as the wavelengths are within the detectable regionof the image sensor. An infrared illuminator has the benefit of notbeing visible to the human eye and thus not distracting to the driver.

[0039] Window 106 may also include an infrared cut filter having anarrow bandwidth around approximately 850 nm for passing infraredradiation corresponding to that emitted from supplemental illuminator102 while blocking most other light. The filter could also be a narrowband blue filter, but would preferably be infrared. The filter could beprovided directly on or proximate the image sensor die.

[0040] A block diagram of the moisture sensing circuitry is shown inFIG. 7. As mentioned above, a predetermined portion of the windshield 26is imaged onto the image sensor array 32. The image sensor array iscontrolled by a processing system/circuit that also reads and processesthe data obtained from sensor array 32. The processing system includesan analog-to-digital converter 35, a timing and control circuit 37, anda microcontroller 38. The analog voltage of each of the pixels withinthe sensor 32 is converted to digitized grayscale value by way of theanalog-to-digital converter 35. The analog-to-digital converter 35 isoperated under the control of the timing and control circuit 37, which,in turn, is controlled by the microcontroller 38. The timing and controlcircuit 37 is described in detail in commonly assigned U.S. Pat. No.5,990,469, entitled “CONTROL CIRCUIT FOR IMAGE ARRAY SENSORS,” by Jon H.Bechtel et al., the entire disclosure of which is incorporated herein byreference. In a preferred embodiment, the processing systemindependently controls the exposure of various subwindows of the imagesensor array 32 in the manner described further below.

[0041] A suitable microcontroller 38 is a Motorola STAR 12™, part No.MCS912D64. In the event that the microcontroller does not containsufficient random access memory (RAM) to store an entire image from theimage sensor, the windowing feature of the CMOS imaging sensors may beused to alternatively image and process different regions of a smallenough size for the onboard RAM of the microcontroller 38.Alternatively, the in-line processing procedure disclosed in commonlyassigned U.S. Patent Application No. 6,631,316, entitled “IMAGEPROCESSING SYSTEM TO CONTROL VEHICLE HEADLAMPS AND OTHER VEHICLEEQUIPMENT,” filed on Mar. 5, 2001, by Joseph S. Stam et al. may be usedto reduce the memory requirements of the processor. The entiredisclosure of the '316 patent is incorporated herein by reference.

[0042] Once an image is acquired by the image sensor 32, the luminanceof each pixel, represented by an analog voltage, is converted to adigital grayscale value by the analog-to-digital converter 35. Thesevalues are written to memory, which may be on board the microcontroller38 and processed by the microcontroller 38 or alternatively a digitalsignal processor.

[0043] To further enhance the accuracy of the system and to enable thesystem to distinguish between raindrops and windshield cracks or debrison the windshield, the processing system 38 preferably utilizes edgedetection techniques and may analyze the spatial high frequencycomponents of the image(s). More specifically, raindrops are detected byquantifying the discontinuity resulting from sharp edges of theraindrops on the windshield. These sharp edges are caused by the focusedimages of the rain or other moisture droplet along with the randomoptical imaging of far-field objects by the droplets or other moisture.Laplacian, Sobel, or preferably Prewitt filtering may be employed fordetecting the edges in the images.

[0044] As shown in FIG. 8, image sensor array 32 may effectively bedivided into a plurality of subwindows 110. In the case of an imagesensor array 32 having sixty-four columns of pixels and eighty rows ofpixels, a suitable subwindow 110 may be formed of an 8×8 block of thepixels forming image array sensor 32. In this manner, image sensor array32 may be effectively divided into an array of 8×10 subwindows. As usedherein, a subwindow may include a block of contiguous pixels, a singleline of pixels, alternating lines of pixels, or various othercombinations of pixels corresponding to a subset of all the pixels ofthe array.

[0045] The processing system analyzes the images from each of theplurality of subwindows 110 (FIG. 8) of the image sensor array 32 forsharp discontinuities caused by the edges of the water rain droplets orother moisture and by random focusing of the distant objects by thedroplets. These discontinuities represent high spatial frequencycomponents. The spatial distribution of the detected edges may be usedto distinguish moisture on the windshield from other objects such asbugs, debris, or headlamps of oncoming vehicles or tail lights ofpreceding vehicles because rain is typically much more evenlydistributed across the imaged portion of the windshield. An indicator ofthe spatial distribution of the detected edges is the number ofsubwindows 110 in which edges are detected. The greater the number ofsubwindows in which edges are detected, the greater the spatialdistribution of the detected edges and hence the objects that are on thewindshield. Moreover, the greater the spatial distribution of theobjects, the greater the magnitude of moisture and hence the faster thewindshield wipers should be operated. The magnitude of the spatial highfrequency components and the number of subwindows 110 in which edges aredetected are used to control a windshield wiper motor control 40 (FIG.7) such that the frequency of wiping of the windshield wiper blades(i.e., time interval between wipes) is controlled as a function of theamount of moisture on the windshield. Alternatively, the wipers may beactivated each time a threshold level of moisture on the window (i.e.,number of subwindows in which edges are detected) is reached.

[0046] The system is also able to adapt to varying light levels. Inparticular, during selected cycles, the average grayscale value of theimage may be computed. If this value is high, indicating an overexposureto light, the exposure time of the image sensor may be reduced to lowerthe average brightness. Similarly, if the light level is low, theexposure time may be increased. The specific manner in which theexposure time of the image sensor is adjusted is discussed furtherbelow.

[0047] When the image obtained by image sensor array 32 is divided intosubwindows 110, the sensitivity/exposure time of each of the subwindows110 may be independently adjusted. Alternatively, theexposure/sensitivity level of the image sensor array 32 may be varied asa whole. When varying the sensitivity of the image sensor array as awhole, the average grayscale value of the pixels may be computed and thesensitivity adjusted (as described further below) to maintain theaverage grayscale value within predefined limits. However, whenadjusting the sensitivity of the image sensor array 32 as a whole,far-field light sources, such as those from an oncoming vehicle, maycause large intrascene illumination variations. If these largevariations are not taken into account, parts of the image may beoverexposed or underexposed, which reduces the detectable contrastcaused by rain on the windshield. It is therefore preferable to adjustthe sensitivity of the subwindows independent of one another based uponthe average grayscale value output from the pixels of the subwindow.Thus, if bright headlights from an oncoming vehicle produce large brightspots in only two of the eighty subwindows of the image sensor array 32,the exposure/sensitivity of those subwindows may be reduced relative tothat of the remaining subwindows without also reducing the sensitivityof the remaining subwindows and thereby maintaining the sensitivity andcontrast within those other subwindows.

[0048] By independently controlling the sensitivity of subwindows withinimage sensor array 32, the system may be configured to adjust thesensitivity of those subwindows imaging the portion of the image abovethe horizon relative to those subwindows imaging a portion of the imagebelow the horizon. This may be quite significant during those periodsduring which the sky is relatively bright compared to the road and othersurroundings.

[0049] Regardless of whether exposure is adjusted on a per subwindowbasis, the basic automatic gain control (AGC) algorithm, which may beperformed by microcontroller 38, is the same. First, in order to reducecomputational requirements, the AGC algorithm preferably uses integerarithmetic only. The algorithm works by first calculating the pixelaverage of either the entire image sensor array or the subwindow underconsideration. If this average is already within a specified band (theimage is already properly exposed), then the next exposure for thesubwindow/image sensor array is left unchanged. Otherwise, the algorithmcontinues by comparing the pixel average target with the current pixelaverage. If the target is larger than the current average, then theexposure for the subwindow or whole image sensor array will be adjustedhigher. Likewise, if the pixel average target is smaller then thecurrent image window pixel average, the exposure is adjusted lower. Inboth cases, the difference between the current pixel average and thetarget is calculated. This difference is then adjusted depending on thecurrent exposure value and added or subtracted as appropriate to thecurrent exposure in order to create the new exposure value. Thisdifference value adjustment may be performed by logic left or rightshifts, which effectively multiply or divide the exposure value byincreasing powers of two. The reason this may be preferable is that theimager results are much more sensitive to small absolute changes inexposure when the current exposure value is small. The AGC algorithmmakes similar adjustments on a percentage basis across the largeexposure value range without using floating-point arithmetic. Minimumand maximum exposure value constants may be used to clip all exposurevalues generated by the AGC algorithm. This limits the exposure range toavoid noise problems at very small exposures and timing problems (insufficient frame rate) at very large exposures.

[0050] In addition to the AGC algorithm discussed above, the exposurelevel of the array or of subwindows or individual pixels may also beadjusted by varying the analog-to-digital conversion parameters of ADC35, or adjusting the analog gain of the sensor outputs.

[0051] As noted above, it is preferable to make use of the “distributed”property of rain to help identify rain images. When it is raining, ingeneral the raindrops tend to be spread somewhat evenly across theentire image. Far-field lights, however, tend to show up in a morelocalized manner. To detect bright lights in the subwindows, the averagepixel variation is determined. The average pixel variation is defined asthe average absolute difference between the pixel value and the pixelgrayscale average across the entire subwindow. The bright far-fieldlights cause extremely high contrast in the imaged subwindows, whichalso results in a high pixel variation in the subwindow. Normallyexposed raindrops cause lower pixel variations. Thus, each subwindow maybe tested against a maximum pixel variation threshold to determine ifthe subwindow should be considered for further rain processing. If theaverage pixel variation for a subwindow exceeds the maximum pixelvariation threshold, microcontroller 38 may exclude the subwindow fromthe subwindow count upon which microcontroller 38 determines if rain ispresent.

[0052] Although the preferred embodiment has been disclosed as utilizingeighty subwindows of 8×8 pixels each, it will be appreciated by thoseskilled in the art that any number of subwindows may be utilized of anyresolution. In general, the greater the number of subwindows, thegreater the ability of the system to block out and ignore brightfar-field objects or faulty pixels. However, arbitrarily increasing thenumber of subwindows will decrease the resolution within each subwindowdue to the limited number of pixels in the entire array. If the numberof pixels within a subwindow is too small, then the average valuecomputed for the subwindow will vary more significantly and be morelikely to produce inconsistent results across the entire image sensorarray. Also, it will become more likely that an edge lies betweensubwindows that could go undetected.

[0053] An example of an image sensor suitable for use in the presentinvention is disclosed in commonly assigned U.S. Pat. No. 6,008,486,entitled “WIDE DYNAMIC RANGE OPTICAL SENSOR,” by Joseph S. Stam et al.,the entire disclosure of which is incorporated herein by reference.

[0054] By taking advantage of the inherent memory in the sensorcircuits, correlated double samples may be obtained directly from theimage sensor to subtract out the ambient light and thus reduce thememory requirements of the processor or associated external memory.Another method for preserving memory in the event that the above-notedcorrelated double sampling inherent in the sensor circuit is notutilized, is for microcontroller 38 to read the image data one row at atime, first with illumination and then without illumination utilizing aone-dimensional filter to subtract out the image data of the row withand without illumination from one another. The result may then be storedin the RAM associated with the microcontroller 38 prior to reading thenext row with and without illumination.

[0055] The system described above may also be used to detect the passingof the wiper blades past the imaged area of the windshield. If thewipers of the automobile are designed in such a way that the wipers arenever approximately vertical when it crosses the imaged area, thefilters described above can be modified to accommodate such aconfiguration. For example, various other edge detection methods wellknown in the art of image processing can also be used. Additionally, ifthe wiper speed for the vehicle windshield wipers is so fast that itblurs slightly in the image for the necessary exposure time, thehorizontal filter can be modified to subtract the pixels two positionsto the left and right of the current pixel instead of the pixelsimmediately next to the current pixel.

[0056] After the wiper has cleared the imaged area, additional images ofthe windshield are acquired. These images may be used as a zero pointmeasurement that may be subtracted from all subsequent measurementsuntil the next wipe. In this way, long-term high frequency spatialcomponents in the image of dirty windshield, cracks, scratches, andfrozen ice will not contribute to the detected amount of rain.

[0057] If the windshield wiper is not detected within a given timeframe, the system assumes that a malfunction has occurred, which can becaused as a result of the windshield wiper being frozen to thewindshield. During such a condition, the operation of the moisturesensor in accordance with the present invention can be suspended for aperiod of time to allow the ice to thaw. If outside temperatureinformation is available, freezing climate conditions can be taken intoaccount to decide if the wipers are failing because of a mechanicalmalfunction or due to ice.

[0058] In order to provide selectivity of a system, a driver on/offsensitivity control circuit 44 (FIG. 7) may be provided. Theintermittent wiper control may be used to allow adjustment of thesystem's sensitivity. This control circuit 44 may be used in specialcircumstances, for example, when the vehicle is in an automatic car washto prevent spurious operation of the system. Because some drivers willoften engage their windshield wipers while driving through an automaticcar wash, which increases the possibility that the wipers will bedamaged by being bent or torn from the vehicle, it would be desirable toconfigure the wiper control system to be responsive to a signal from aremote device so as to at least temporarily disable the wipers fromoperation during such time that the vehicle is traveling through the carwash. This may be accomplished by providing a transmitter that transmitsa relatively low strength IR or RF signal at the entrance to theautomatic car wash within the frequency band of most remote keylessentry receivers (202) that are now commonly provided in vehicles. Thesignal may be modulated with a standard code that is then transmittedover the vehicle bus or otherwise transmitted directly tomicrocontroller 38, which recognizes this signal and responds bygenerating a signal to disable the vehicle's windshield wipers eitherfor a predetermined time period following receipt of this disable signalor until such time that a subsequent signal is received at the exit ofthe car wash at which point the microcontroller 38 may toggle a wiperdisable flag to permit the operation of the wipers under control of themoisture sensing system of the present invention or under manualcontrol. This is particularly advantageous when the driver enters theautomatic car wash with the wiper control in the automatic mode, sincethe moisture sensing system would detect moisture when the vehicle hasentered the car wash and then otherwise attempt to activate thewindshield wipers thereby risking their destruction.

[0059] Other mechanisms by which operation of the automatic wiper systemcould be disabled are disclosed in commonly assigned U.S. patentapplication Ser. No. 09/827,304 entitled “VEHICLE REARVIEW MIRRORASSEMBLY INCORPORATING COMMUNICATION SYSTEM,” by Robert R. Turnbull etal., on Apr. 5, 2001, which was published as U.S. Patent ApplicationPublication No. 2002/0032510 A1, the entire disclosure of which isincorporated herein by reference. For example, microcontroller 38 couldbe coupled to a microwave receiver that receives signals from aplurality of satellites such as GPS satellites. The microcontroller 38may then disable or enable automatic activation of the windshield wipersin response to information obtained from the microwave receiver. Suchinformation may, for example, indicate that the microwave receiver isreceiving signals from less than a predetermined number of GPSsatellites thereby indicating that the vehicle has entered an enclosedarea, such as a car wash or parking garage. Alternatively, GPSinformation, upon which microcontroller 38 may otherwise deactivate oractivate the automatic windshield wipers, may include vehicle locationdata that may be compared to a database of known locations of automaticcar washes.

[0060] The system of the present invention may also include a mechanismfor detecting fog on the inside or outside surface of the windshield.Such a mechanism is disclosed in U.S. Pat. No. 5,923,027, the entiredisclosure of which is incorporated herein by reference. To implementsuch a fog detecting mechanism with the moisture sensing system of thepresent invention, an illuminator 66, such as an LED, would be added inaddition to supplemental illuminator 102. Unlike illuminator 102, whichilluminates the entire imaged area of the windshield, the additionalilluminator 66 would be configured to project a focussed spot of lightonto the windshield that is then sensed using one or both of the imagesensor arrays.

[0061] According to another embodiment of the present invention, a fogdetector 160 is provided for detecting the presence of fog on either theinside or outside of a window 26. Window 26 may be any of the windows ina vehicle or may be a window other than in a vehicle. Fog detector 160includes an emitter 164 and a sensor 166 disposed with their opticalaxes generally in parallel. Emitter 164 and sensor 166 are preferablymounted in very close proximity, if not in contact with one another,within a housing 162. The optical axis of the emitter is preferablyoriented with respect to the window such that the light emittedtherefrom does not impinge the window at an angle causing the light toenter and be internally reflected within the window as are some forms ofprior art moisture sensors. Housing 162 may be the housing of a rearviewmirror assembly when window 26 is the front windshield of the vehicle ormay be a housing on the mount of the rearview mirror assembly.Alternatively, housing 162 may be incorporated into a centerhigh-mounted stoplight (CHMSL) assembly or any other vehicle accessoryadjacent a vehicle window. Examples of such vehicle accessories ormounting locations include the rear dash, the instrument panel dash, theheadliner, an overhead console, a window-mounted console, A-, B-, orC-pillars, etc.

[0062] Emitter 164 may be virtually any light source and is preferablyan LED. Emitter 164 preferably emits infrared radiation so as to notproject a visible spot on the window. The optics of the emitter ispreferably such that the light it emits is divergent rather thanfocussed to a spot.

[0063] Sensor 166 may be any form of sensor that is sensitive to theradiation emitted from emitter 164. The field of view of sensor 166 ispreferably essentially equivalent to the angle of emission of emitter164 on window 26. Sensor 166 may be a CdS sensor or a CMOS photodiode ofthe type disclosed in the above-referenced U.S. Pat. No. 6,359,274. Ifthe fog detector 160 is implemented in a rearview mirror assembly andthe rearview mirror assembly incorporates an electrochromic mirror,sensor 166 may also function as a forward ambient light sensor whoseoutput is utilized in determining the reflectance level of theelectrochromic mirror.

[0064] Fog detector 160 further includes a control circuit 170, whichmay be analog, or include a microcontroller. Control circuit 170 may ormay not be housed within the same housing 162 as emitter 164 and sensor166. Control circuit 170 is communicatively coupled to the climatecontrol 172 of the vehicle, which in turn is coupled to thedefogger/defroster 174. Defogger/defroster 174 may be type that blowsair onto the interior surface of window 26 or may be the type used on arear window and having one or more electric heating elements for heatingthe interior surface of the rear window 26.

[0065] In general, control circuit 170 selectively and periodicallyactivates emitter 164 while sensing the output of sensor 166 both whenemitter 164 is activated and when it is not activated. Control circuit170 may be calibrated during such time that window 26 is clear todetermine the light level difference sensed by sensor 166 when emitter164 is activated and when it is not activated. This calibrateddifference may then be utilized to establish a threshold difference forcomparison of the sensed differences later obtained during use. Whenthere is a fog on the inside or outside of window 26, the light isdiffused and reflected back towards sensor 166 thereby creating a muchgreater difference in light levels sensed by sensor 166 when emitter 164is activated and deactivated. When this difference reaches a thresholdlevel, control circuit 170 may generate a signal to the climate controlsystem 172 to cause the defroster 174 to be activated. Control circuit170 may be connected by a discrete line to climate control 172 or it maycommunicate therewith either over the vehicle bus or via a wirelesslink. By sensing the light level without emitter 164 activated, controlcircuit 170 may determine the relative ambient light level and adjustthe levels otherwise sensed when emitter 164 is activated for thedetected ambient light level.

[0066] While fog detector 160 is preferably calibrated during vehiclemanufacture, it may subsequently automatically calibrate at such timesthat the vehicle windshield is clear. Such subsequent automaticcalibration may be desirable in view of the fact that the windshield mayotherwise be dirty or include a film as is often caused by smokingcigarettes within the vehicle. Control circuit 170 may utilize climateinformation from climate control 172 or from other sources to determinewhen window 26 would otherwise be clear of fog. Clearly, it would bedesirable to avoid activating defogger/defroster 174 when the window ismerely dirty and such activation of defogger/defroster 174 will notassist in clearing window 26. Information that control circuit 170 mayutilize in determining whether the windshield should otherwise be clearmay include sensed conditions such as provided from interior andexterior temperature sensors and humidity sensors that may otherwise beused in the vehicle. For example, a comparison of the interior andexterior temperatures will typically indicate whether it is evenpossible for there to be fog on the vehicle windshield. Additionally,control circuit may determine whether fog is possible by monitoring theoutput of sensor 166 over time following activation of the defroster174. For example, as detected fog the windshield decreases over time,the output of the sensor 166 approaches a constant level representing abaseline for that windshield. This baseline may not necessarilyrepresent a perfectly clear windshield, since the windshield may becoated with a layer of dirt or soot from smoking in the vehicle. Thebaseline can then be stored for use in subsequent comparisons forautomatically activating the defroster 174.

[0067] By minimizing the spacing between the optical axes of emitter 164and sensor 166, the field of view of the sensor will more likelycorrespond to the projected spot of emitter 164 and the system may bepositioned relatively close, i.e., within six inches or less, of theinterior surface of window 26. This would allow the fog detector 160 tobe incorporated in many different forms of vehicle accessories that areprovided in proximity to the vehicle window. To minimize spacing ofemitter 164 and sensor 166, both may be encapsulated in a commonencapsulant.

[0068] Unlike other fog detecting systems previously known, the fogdetector 160 shown in FIG. 9 may be implemented at a relatively low costthereby making it practical to incorporate the inventive fog detectingsystem in a CHMSL assembly or other vehicle accessory in proximity tothe rear windshield of the vehicle for the function of controlling therear defroster. Most rear defrosters generally are manually activatedand remain active only for a predetermined period of time regardless ofwhether the rear window is already cleared. By utilizing the fogdetector of the present invention, the rear window or any other windowmay be maintained in a clear state without over-utilizing the climatecontrol system.

[0069] As shown in FIG. 7, the microcontroller 38 may also be coupled toa vehicle headlamp circuit 200 for controlling the state of the vehicleheadlamps. Microcontroller 38 may control the state of the vehicleheadlamps, i.e., on/off mode (low-beam, high-beam, daytime runninglamps, brightness, aim., etc.), in response to images detected utilizingeither image sensor array 32 or an additional image sensor array that isotherwise coupled to microcontroller 38. Similarly, an additionalmicrocontroller 38 could be provided to read the information from imagesensor array 32 for the purpose of controlling vehicle headlamp circuit200. By combining components of the inventive moisture sensor systemwith a headlamp control circuit, duplication of parts may be minimizedthereby allowing the implementation of both features in a vehicle at arelatively low cost. Examples of such headlamp dimming systems aredisclosed in commonly-assigned U.S. Pat. Nos. 5,837,994, 6,049,171,6,255,639, and 6,281,632, the entire disclosures of which areincorporated herein by reference.

[0070] Also, by combining the system shown in FIG. 9 or the functionalaspects thereof with any vehicle-mounted system employing a camera(i.e., systems for headlamp dimming, adaptive cruise control, collisionavoidance, lane departure detection, rear vision, night vision, etc.),one may determine whether the system's camera view is blocked or thewindow in front of the camera is merely fogged over. The system shown inFIG. 9 is sufficiently small to allow it to be incorporated within sucha camera behind any window it may have within its housing in order todetermine whether the camera's view is impaired. A second such systemmay then be employed to detect whether the vehicle window through whichthe camera captures images is foggy. Control of the camera and relatedsystems may then be adjusted or deactivated in response to suchinformation.

[0071] Occasionally when driving up a hill, the vehicle could bepositioned in such a way that the sun is directly imaged by the device.The radiative loading caused by this alignment may damage the imagesensor 32 over time. In order to alleviate such a problem, anelectrochromic filter may be used to temporarily eliminate most of thesunlight from the image plane. Other optical electronic or opticalmechanical devices could also be used. It may be desirable that such adynamic filter have a darkened state when power is removed such that thefilter may function as an effective shutter that is closed when thecamera is not in use. By using such a dynamic filter having a darkenedstate when no power applied, the filter effectively blocks most lightfrom reaching the camera even when the vehicle is turned off withoutdrawing power and draining the vehicle battery. Examples of such filtersinclude electrochromic filters employing tungsten oxide, some LCDdevices, and suspended particle devices.

[0072] Although the present invention has been described as utilizing atwo-dimensional array of sensors to capture a single image of a portionof the windshield, one or more one-dimensional sensor arrays or morethan one two-dimensional sensor arrays may be utilized as disclosed incommonly assigned U.S. Pat. No. 6,617,564, entitled “MOISTURE SENSORUTILIZING STEREO IMAGING WITH AN IMAGE SENSOR,” filed concurrentlyherewith by Harold C. Ockerse et al., the entire disclosure of which isincorporated herein by reference.

[0073] While the invention has been described in detail herein inaccordance with certain preferred embodiments thereof, manymodifications and changes therein may be effected by those skilled inthe art without materially departing from the novel teachings andadvantages of this invention. Accordingly, all such modifications areintended to be included within the scope of this invention as defined inthe following claims and, therefore, it is our intent to be limited onlyby the scope of the appending claims and not by way of the details andinstrumentalities describing the embodiments shown herein.

The invention claimed is:
 1. A fog detector system for detecting fog onan inside surface of a vehicle window, said fog detector systemcomprising: an emitter for selectively projecting radiation onto aregion of the inside surface of the vehicle window; a sensor disposedwith its optical axis substantially in parallel with that of saidemitter, said sensor being sensitive to the radiation projected by saidemitter for sensing levels of incident radiation both when said emitterprojects radiation and when said emitter does not project radiation; anda control circuit coupled to said emitter for selectively activatingsaid emitter, and coupled to said sensor for receiving signals from saidsensor representing the level of incident radiation, said controlcircuit determines the difference between levels of incident radiationwhen said emitter is activated and when said emitter is deactivated, andcompares the difference to a threshold to determine whether fog ispresent, said control circuit generates a signal indicating the presenceof fog on the vehicle window.
 2. The fog detector system of claim 1,wherein said control circuit generates a signal to cause a defogger tobe activated when fog is present.
 3. The fog detector system of claim 2,wherein said control circuit generates a signal to cause the defogger tobe deactivated when fog is no longer detected.
 4. The fog detectorsystem of claim 1, wherein said control circuit generates a signal tocause a defogger to be deactivated when fog is no longer detected. 5.The fog detector system of claim 1, wherein said emitter is an LED. 6.The fog detector system of claim 1, wherein said sensor is a photodiode.7. The fog detector system of claim 1 and further comprising a housingin which said emitter and sensor are supported.
 8. The fog detectorsystem of claim 7, wherein said control circuit is housed in saidhousing.
 9. The fog detector system of claim 7, wherein said housing isa mirror housing of a rearview mirror assembly.
 10. The fog detectorsystem of claim 7, wherein said housing is integrated in a CHMSLassembly.
 11. The fog detector system of claim 2, wherein the vehiclewindow is a rear window and said defogger is a rear window defogger. 12.The fog detector system of claim 1, wherein said control circuitcalibrates to redefine said threshold when said control circuitdetermines that the vehicle window is clear of fog.
 13. The fog detectorsystem of claim 12, wherein said control circuit is configured toreceive climate information upon which said control circuit maydetermine that the vehicle window is clear of fog.
 14. The fog detectorsystem of claim 13, wherein the climate information includes any one orcombination of: interior temperature, exterior temperature, humidity,and defogger activation status.
 15. A method of detecting fog on aninside surface of a vehicle windshield comprising: providing a sensorand an emitter disposed with their optical axes substantially inparallel and aimed generally at a region of the inside surface of thevehicle window; selectively projecting radiation from said emitter ontosaid region of the inside surface of the vehicle window; sensing levelsof incident radiation when said emitter projects radiation and when saidemitter does not project radiation; determining the difference betweenlevels of incident radiation when said emitter projects radiation andwhen said emitter does not project radiation; and comparing thedifference to a threshold to determine whether fog is present.
 16. Themethod of claim 15, wherein said emitter is an LED.
 17. The method ofclaim 1, wherein said sensor is a photodiode.
 18. The method of claim 15and further comprising calibrating and redefining said threshold whenthe vehicle window is clear of fog.
 19. A fog detector system fordetecting fog on an inside surface of a vehicle window, said fogdetector system comprising: an LED for selectively projecting radiationonto a region of the inside surface of the vehicle window; a sensordisposed with its optical axis substantially in parallel with that ofsaid emitter, said sensor being sensitive to the radiation projected bysaid emitter for sensing levels of incident radiation both when said LEDprojects radiation and when said LED does not project radiation; and acontrol circuit coupled to said emitter for selectively activating saidemitter, and coupled to said sensor for receiving signals from saidsensor representing the level of incident radiation, said controlcircuit determines the difference between levels of incident radiationwhen said LED projects radiation and when said LED does not projectradiation, and compares the difference to a threshold to determinewhether fog is present, said control circuit generates a signal to causea defogger to be activated when fog is present and to cause the defoggerto be deactivated when fog is no longer detected.
 20. The fog detectorsystem of claim 19, wherein said sensor is a photodiode.
 21. The fogdetector system of claim 19, wherein said LED and said sensor areintegrated in a CHMSL assembly.
 22. The fog detector system of claim 19,wherein the vehicle window is a rear window and the defogger is a rearwindow defogger.
 23. The fog detector system of claim 19, wherein saidcontrol circuit calibrates to redefine said threshold when said controlcircuit determines that the vehicle window is clear of fog.